package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Role;


import java.util.List;
import java.util.Map;
import java.util.Set;

public interface RoleDao {
    public Set<Role> findByUserId(Integer userId);

    public List<Role> findAll();

    Page<Role> selectByCondition(String queryString);

    public void add(Role role);

    public void setRoleAndPermission(Map<String, Integer> map);

    public void setRoleAndMenu(Map<String, Integer> map);

    public Role findById(Integer id);

    public List<Integer> findPermissisonsByUserId(Integer id);

    public List<Integer> findMenusByUserId(Integer id);

    public void deletePermissionAssociation(Integer id);

    public void deleteMenuAssociation(Integer id);

    public void edit(Role role);

    public void delete(Integer id);
}